#include "game.h"
#include <wgal.h>

namespace
{
	WGAL::Game *game = NULL;

	WGALVoid wgalDraw()
	{
		game->draw();
	}

	WGALVoid wgalUpdate(WGALUInt32 frames)
	{
		game->update(frames);
	}
};

namespace WGAL
{	
	void Game::start()
	{
		game = this;

		switch(wgalStart())
		{
		case WGAL_NOT_READY:
		case WGAL_RESET_FAILED:
			throw "";
			break;
		case WGAL_NO_ERROR:
			break;		
		}
	}
};